<template>
  <div class="small-dialog">
    <el-dialog title="提示" :visible.sync="dialogVisible" width="50%">
      <h2>{{ list.title }}</h2>
      <div>
        <span>{{ list.createTime | formatDate }}</span>
        <span>{{ list.username }}</span>
        <i class="el-icon-view"></i>
        <span>{{ list.visits }}</span>
      </div>
      <el-alert type="info" :closable="false" class="artBody">
        <span v-html="list.articleBody"></span>
      </el-alert>
      <!-- <span @click="show">这是一段信息</span> -->
    </el-dialog>
  </div>
</template>


<script>
export default {
  props: {
    list: {
      required: true,
    },
  },
  data() {
    return {
      dialogVisible: false,
    };
  },
  methods: {
    show() {
      console.log(this.list);
    },
  },
};
</script>

<style>
.small-dialog h2 {
  margin: 0 0 10px;
}
.small-dialog span {
  margin-right: 10px;
}
.small-dialog .artBody {
  margin-top: 20px;
}
.small-dialog .artBody span {
  font-size: 16px;
}

.small-dialog i {
  margin-right: 10px;
}
.small-dialog .el-dialog__header {
  background-color: #409eff;
}
.small-dialog .el-dialog__title {
  color: #fff;
}

.small-dialog .el-icon-close {
  color: #fff;
}
.small-dialog .el-icon-close:hover {
  color: rgb(196, 214, 252);
}
/* .small-dialog
.small-dialog */
</style>